home *** CD-ROM | disk | FTP | other *** search
/ PC User 2003 August / Australian PC User - August 2003 (CD2).iso / software / online / files / netsnip.exe / %MAINDIR% / Templates / Bibliography / Bibliography (MLA Style).xsl < prev    next >
Encoding:
Extensible Markup Language  |  2003-06-02  |  6.0 KB  |  198 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  4.  
  5.   <xsl:template match="/">
  6.  
  7.     <HTML>
  8.  
  9.     <head>
  10.  
  11.       <title>
  12.          <xsl:value-of select="Bibliography/FolderName"/> Bibliography (MLA Style)
  13.       </title>
  14.     </head>
  15.  
  16.       <BODY>
  17.             
  18.     <table border="0" width="40%" cellspacing="0" cellpadding="2">
  19.       <tr><td>
  20.  
  21.            <b><font face="MS Sans Serif" size="2">
  22.              <xsl:value-of select="Bibliography/FolderName"/> Bibliography (MLA Style)
  23.            </font></b>
  24.             <p/>
  25.       </td></tr>
  26.       
  27.       <tr><td>
  28.           <xsl:apply-templates select="Bibliography/FolderDetails"/>
  29.           <xsl:apply-templates select="Bibliography/SnippetDetails"/>
  30.       </td></tr>
  31.  
  32.   <tr>
  33.     <td><hr size="1"/><font face="MS Sans Serif" size="1">MLA Style Bibliography Generated
  34.       by <a href="http://www.netsnippets.com">Net Snippets</a><sup>TM</sup></font></td>
  35.   </tr>
  36.  
  37.     </table>
  38.  
  39.       </BODY>
  40.     </HTML>
  41.  
  42.   </xsl:template>
  43.  
  44.  
  45.   <xsl:template match="FolderDetails">
  46.        <xsl:apply-templates select="FolderDetails"/>
  47.        <xsl:apply-templates select="SnippetDetails"/>
  48.  
  49.   </xsl:template>
  50.  
  51.  
  52.  
  53.   <xsl:template match="SnippetDetails">
  54.              
  55.  
  56.           <xsl:if test="/Bibliography/Settings/Biblio_Name">
  57.  
  58.         <b>
  59.                 <xsl:choose>
  60.                 <xsl:when test="/Bibliography/Settings/Biblio_LinkSnippet">
  61.                   <A>
  62.                     <xsl:attribute name="HREF"><xsl:value-of select="Path"/></xsl:attribute>
  63.                    <font size="1" face="MS Sans Serif">
  64.                     <xsl:value-of select="Name"/><xsl:value-of select="Extension"/> 
  65.                    </font> 
  66.                   </A>
  67.         </xsl:when> 
  68.                 
  69.             <xsl:otherwise>
  70.                    <font size="1" face="MS Sans Serif">
  71.                     <xsl:value-of select="Name"/><xsl:value-of select="Extension"/>
  72.                    </font> 
  73.                 </xsl:otherwise>
  74.         
  75.         </xsl:choose>
  76.         </b>
  77.  
  78.               </xsl:if> 
  79.            <br/>    
  80.                <font size="1" face="MS Sans Serif">
  81.    
  82.                <xsl:apply-templates select="Biblio" order-by="Authors"/>
  83.                </font>
  84.  
  85.   </xsl:template>
  86.  
  87.  
  88.   <xsl:template match="Biblio">
  89.     <xsl:choose>
  90.     <xsl:when test="Type[.='Web Site']">
  91.             <xsl:apply-templates select="Authors"/>
  92.             <u><xsl:value-of select="Title"/></u>.
  93.             <xsl:apply-templates select="Compilers"/>
  94.             <xsl:apply-templates select="Editors"/>
  95.             <xsl:apply-templates select="Translators"/>
  96.             <xsl:apply-templates select="Date_Created"/>
  97.             <xsl:apply-templates select="Institution"/>
  98.             <xsl:apply-templates select="Date_Accessed"/>
  99.             <xsl:apply-templates select="URL"/>
  100.     </xsl:when> 
  101.  
  102.     <xsl:when test="Type[.='Book']">
  103.             <xsl:apply-templates select="Authors"/>
  104.             <u><xsl:value-of select="Title"/></u>.
  105.             <xsl:apply-templates select="Compilers"/>
  106.             <xsl:apply-templates select="Editors"/>
  107.             <xsl:apply-templates select="Translators"/>
  108.             <xsl:apply-templates select="Date_Accessed"/>
  109.             <xsl:apply-templates select="URL"/>
  110.     </xsl:when> 
  111.  
  112.     <xsl:when test="Type[.='eZine']">
  113.             <xsl:apply-templates select="Authors"/>
  114.             "<xsl:value-of select="Title"/>."
  115.             <xsl:apply-templates select="Compilers"/>
  116.             <xsl:apply-templates select="Editors"/>
  117.             <xsl:apply-templates select="Translators"/>
  118.             <xsl:apply-templates select="Name"/>
  119.             <xsl:apply-templates select="Date_Created"/>
  120.             <xsl:apply-templates select="Date_Accessed"/>
  121.             <xsl:apply-templates select="URL"/>
  122.     </xsl:when> 
  123.  
  124.     <xsl:when test="Type[.='eJournal']">
  125.             <xsl:apply-templates select="Authors"/>
  126.             "<xsl:value-of select="Title"/>."
  127.             <xsl:apply-templates select="Compilers"/>
  128.             <xsl:apply-templates select="Editors"/>
  129.             <xsl:apply-templates select="Translators"/>
  130.             <xsl:apply-templates select="Name"/>
  131.             <xsl:apply-templates select="Date_Created"/>
  132.             <xsl:apply-templates select="Date_Accessed"/>
  133.             <xsl:apply-templates select="URL"/>
  134.     </xsl:when> 
  135.  
  136.     <xsl:when test="Type[.='Newspaper']">
  137.             <xsl:apply-templates select="Authors"/>
  138.             "<xsl:value-of select="Title"/>."
  139.             <xsl:apply-templates select="Compilers"/>
  140.             <xsl:apply-templates select="Editors"/>
  141.             <xsl:apply-templates select="Translators"/>
  142.             <xsl:apply-templates select="Name"/>
  143.             <xsl:apply-templates select="Date_Created"/>
  144.             <xsl:apply-templates select="Date_Accessed"/>
  145.             <xsl:apply-templates select="URL"/>
  146.     </xsl:when> 
  147.  
  148.     <xsl:otherwise>
  149.          <b><font color="#FF0000">Type not currently supported in MLA Style</font>: <xsl:value-of select="Type"/></b><br/>
  150.  
  151.     </xsl:otherwise>
  152.  
  153.     </xsl:choose>
  154.     <p/>
  155.  
  156.  </xsl:template>  
  157.  
  158.   <xsl:template match="Authors">
  159.       <xsl:value-of select="."/>.
  160.   </xsl:template>  
  161.  
  162.   <xsl:template match="Compilers">
  163.       Comp. 
  164.       <xsl:value-of select="."/>.
  165.   </xsl:template>  
  166.  
  167.   <xsl:template match="Editors">
  168.       Ed.
  169.       <xsl:value-of select="."/>.
  170.   </xsl:template>  
  171.  
  172.   <xsl:template match="Translators">
  173.       Trans.
  174.       <xsl:value-of select="."/>.
  175.   </xsl:template>  
  176.  
  177.   <xsl:template match="Date_Created">
  178.       <xsl:value-of select="."/>.
  179.   </xsl:template>  
  180.  
  181.   <xsl:template match="Institution">
  182.       <xsl:value-of select="."/>.
  183.   </xsl:template>  
  184.  
  185.   <xsl:template match="Date_Accessed">
  186.       <xsl:value-of select="."/>
  187.   </xsl:template>  
  188.  
  189.   <xsl:template match="Name">
  190.       <u><xsl:value-of select="."/></u>.
  191.   </xsl:template>  
  192.  
  193.   <xsl:template match="URL">
  194.       <<A><xsl:attribute name="HREF"><xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></A>>.
  195.  
  196.   </xsl:template>  
  197.  
  198. </xsl:stylesheet>